import Vue from 'vue';
import {
    Button,
    Switch,
    Rate,
    Tabbar,
    TabbarItem,
    NavBar,
    Toast,
    Search,
    Swipe,
    SwipeItem,
    Grid,
    GridItem,
    Icon,
    Divider,
    Lazyload,
    ActionSheet,
    Dialog,
    Checkbox,
    Tab,
    Tabs,
    AddressList,
    AddressEdit,

} from 'vant';

// 使用数组来存储需要注册的组件  
const components = [
    Button,
    Switch,
    Rate,
    Tabbar,
    TabbarItem,
    NavBar,
    Toast,
    Search,
    Swipe,
    SwipeItem,
    Grid,
    GridItem,
    Icon,
    Divider,
    Lazyload,
    ActionSheet,
    Dialog,
    Checkbox,
    Tab,
    Tabs,
    AddressList,
    AddressEdit,

];

// 遍历数组，逐个注册组件  
components.forEach(component => {
    Vue.use(component);
});